package charatr04.example;
class Animal16{
    public  void shout(){
        System.out.println("喵喵······");
    }
}
class Dog16 extends Animal16{
    public void shout() {
        System.out.println("汪汪······");
    }
    public void eat(){
        System.out.println("吃骨头······");
    }
}
public class Example16 {
    public static void main(String[] args) {
        Animal16 an = new Dog16();
        Dog16 dog = (Dog16) an;
        dog.shout();
        dog.eat();
//        an.eat() Animal没有eat方法 所以eat无法使用
    }
}
